//
//  LSTeamMatchViewController.m
//  LookScore
//
//  Created by wr on 2018/4/20.
//  Copyright © 2018年 ChongQingXunTiCompany. All rights reserved.
//

#import "LSTeamMatchViewController.h"
#import "UIViewController+ZJScrollPageController.h"
#import "ZJScrollPageView.h"
#import "CustomSegmentedView.h"
#import "LSTeamDetailCell.h"
//#import "LSLeagueCompetitionBaseVController.h"//联赛赛事
@interface LSTeamMatchViewController ()<UITableViewDelegate,UITableViewDataSource>

@property(strong,nonatomic)UITableView *tableView;

@property(strong,nonatomic)NSMutableArray *modelArray;

@property(strong,nonatomic)NSArray *titlesArray;

@end

@implementation LSTeamMatchViewController

-(UITableView *)tableView{
    if (!_tableView) {
        _tableView = [[UITableView alloc]init];
        _tableView.delegate = self;
        _tableView.dataSource = self;
        _tableView.backgroundColor =LSBackGroundColor;
        _tableView.showsVerticalScrollIndicator = NO;
        _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    }
    return _tableView;
}
-(NSMutableArray *)modelArray{
    if(!_modelArray){
        _modelArray=[[NSMutableArray alloc]init];
    }
    return _modelArray;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

-(void)zj_viewDidLoadForIndex:(NSInteger)index{
    
    self.titlesArray=@[@"已完场",@"未开始"];
    self.tableView.tableHeaderView=[self tableHeadView];
    [self.view addSubview:self.tableView];
    self.tableView.sd_layout.leftEqualToView(self.view).topEqualToView(self.view).rightEqualToView(self.view).bottomEqualToView(self.view);
    
}
#pragma mark 🔥 tableViewDelegate tableViewDataSource
-(UIView *)tableHeadView{
    
    UIView *backView=[[UIView alloc]initWithFrame:CGRectMake(0, 0, LSScreenWidth, 44)];
    backView.backgroundColor=LSTitleWhiteColor;
    
    CustomSegmentedView *aCustomSegmentedView=[[CustomSegmentedView alloc]initWidthCustomSegmentedViewFrame:CGRectMake((LSScreenWidth-128)/2, 10, 128, 24) titlesArray:self.titlesArray seletedTitleColor:[UIColor whiteColor] normalTitleColor:LSSubColorFF9E44 seletedBgColor:LSSubColorFF9E44 normalBgColor:[UIColor whiteColor] bordeColor:LSSubColorFF9E44  borderWidth:1 seletedCustomViewIndex:^(NSInteger index) {
        
    }];
    
    [aCustomSegmentedView selectedDefaultSegmentedIndex:1];
    
    [backView addSubview:aCustomSegmentedView];
    
    return backView;
    
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 6;// self.modelArray.count;
}


- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    return  35;
    
}



- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    LSTeamMatchCell *cell=[LSTeamMatchCell TeamMatchCellByTableView:tableView];
    if (indexPath.row % 2 == 0) {
        cell.backgroundColor = LSSubGrayColorf7;
    }
    else{
        cell.backgroundColor = [UIColor whiteColor];
    }
    return cell;
    
}


-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    
    return 44;
    
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
//    LSLeagueCompetitionBaseVController *baseVC=[[LSLeagueCompetitionBaseVController alloc]init];
//
//    [self.navigationController pushViewController:baseVC animated:YES];
    
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end


